package com.llho.admin.catalog;

import java.util.ArrayList;
import java.util.List;

import com.llho.core.bo.CatalogBo;
import com.llho.core.domain.Catalog;
import com.llho.admin.BaseAction;

public class CatalogAction extends BaseAction{
	Catalog catalog =  new Catalog();
	List<Catalog> catalogues = new ArrayList<Catalog>();
	
	CatalogBo catalogBo;
	// DI via Spring
	public void setCatalogBo(CatalogBo catalogBo){
		this.catalogBo = catalogBo;
	}
	
	public String list(){
		catalogues  = catalogBo.getAll();
		
		if(catalogues.size() > 0)
			return redirect("Listing.llh");
		
		return "success";
	}
}
